package cn.faster.sys.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * <p>
 * 用户表
 *</p>
 *
 * @author xiaoCoder
 * @date 2021-06-06
 */
@Data
@TableName(value = "sys_user",excludeProperty = {"captcha"})
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "用户表")
public class SysUser extends Model<SysUser> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户id")
    @TableId
    private Long id;

    @ApiModelProperty("用户名称")
    private String name;

    @ApiModelProperty("账号")
    private String username;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("电话")
    private String phone;

    @ApiModelProperty("头像路径")
    private String heardImg;

    @ApiModelProperty("住址")
    private String address;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("0:未删除；1：删除")
    private Integer delFlag;

    @ApiModelProperty("0:学生；1：老师；2：管理员")
    private Integer lev;

    @ApiModelProperty("盐")
    private String salt;

    private String captcha;

}